package com.geekhalo.domainevent.v3.listener;

import com.geekhalo.domainevent.service.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Service;

@Service
public class SMSListener {

    @Autowired
    private SMSService smsService;

    @EventListener
    public void sendSMS(OrderCreatedEvent event){
        SendSMSCommand sendSMSCommand = buildSendSMSCommand...
        this.smsService.send(sendSMSCommand);
    }

}
